//
//  MCAppVersionManager.h
//  CloudSteward
//
//  Created by coderxslee on 2020/12/11.
//  Copyright © 2020 CoderXSLee. All rights reserved.
//

#import <Foundation/Foundation.h>

@class MCAppInfoModel;

//如果为开发状态,设置为 NO; 如果为生产状态,应改为 YES.
#ifdef DEBUG
static BOOL isProduction = NO;
#else
static BOOL isProduction = YES;
#endif
 
@interface MCAppVersionManager : NSObject

/// 显示App 版本号
- (void)versionUpdate;
- (void)showAppVerSion;
- (void)appStatus:(void(^)(BOOL isReview))completion;

/// 设置要在 app store 中查询的 AppID
- (void)setAppID:(NSString *)appID;

@end

@interface MCAppInfoModel : NSObject

/// AppID (App Store Connect)
@property (nonatomic, strong) NSString *trackId;
/// AppName
@property (nonatomic, strong) NSString *trackName;
/// BundleID
@property (nonatomic, strong) NSString *bundleId;
/// AppVersion
@property (nonatomic, strong) NSString *version;
/// 更新内容
@property (nonatomic, strong) NSString *releaseNotes;
/// 更新日期
@property (nonatomic, strong) NSString *currentVersionReleaseDate;
/// 更新地址
@property (nonatomic, strong) NSString *trackViewUrl;

+ (instancetype)appInfoWithDict:(NSDictionary *)dict;

@end


/// 单例
@interface MCAppVersionManager (Singleton)
+ (instancetype)sharedInstance;
@end
